package com.liao.badminton.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * Auth配置
 */
@Configuration
public class AuthConfiguration implements WebMvcConfigurer {
    @Resource
    private Environment environment;

//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(authenticationInterceptor()).addPathPatterns("/**");
//    }

//    @Bean
//    public AuthenticationInterceptor authenticationInterceptor() {
//        String activeProfile = environment.getProperty("spring.profiles.active");
//        return new AuthenticationInterceptor(activeProfile);
//    }
}
